package com.example.mscloud.controller;


import com.example.mscloud.common.entities.Payment;
import com.example.mscloud.common.entities.result.CommonResult;
import com.example.mscloud.service.FeignOrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("feign")
public class FeignOrderController {

    @Resource
    private FeignOrderService orderService;

    @GetMapping("order/payment/create")
    public CommonResult<Payment> paymentCreate(Payment payment){
        return orderService.paymentCreate(payment);
    }


    @GetMapping("order/payment/info/{id}")
    public CommonResult<Payment> paymentInfo(@PathVariable("id") Long id){
        return orderService.paymentInfo(id);
    }

}
